
 <script language="javascript">
 changeWaiting(0); 
  $(document).ready(function () {
    initForm('fmfrmreportrevenue_tblinfo'); 
    initDivleft();     
});
 var fmfrmreportrevenue_cal1 = CreateCalObject('fmfrmreportrevenue_fromdate', 'fmfrmreportrevenue_imgCal1');
var fmfrmreportrevenue_cal2 = CreateCalObject('fmfrmreportrevenue_todate', 'fmfrmreportrevenue_imgCal2');
var fmfrmreportrevenue_cal3 = CreateCalObject('fmfrmreportrevenue_dateDelete', 'fmfrmreportrevenue_imgCal3'); 

function fmfrmreportrevenue_createReport(){
    if(!checkDate('fmfrmreportrevenue_fromdate','fmfrmreportrevenue_todate',90)){
        return false;
    }
     fromdate = ConvertoDateEN($('#fmfrmreportrevenue_fromdate').val());
     todate = ConvertoDateEN($('#fmfrmreportrevenue_todate').val());
     reporttype = $('INPUT[NAME=fmfrmreportrevenue_reporttype]:checked').val();
     changeWaiting(0);
     xajax_fmfrmreportrevenue_load(fromdate,todate,reporttype);  
}

function fmfrmreportrevenue_deleteRevenue(){
    var dateDelete = $('#fmfrmreportrevenue_dateDelete').val();
    if(!isDate(dateDelete)){
        alert('Vui lòng nhập chính xác ngày xóa thông tin');
        $('#fmfrmreportrevenue_dateDelete').focus();
        return false;
    }
    if(confirm('Chắc chắn xóa thông tin doanh thu đến trước ngày '+dateDelete+'?')){
      var dateDelete = ConvertoDateEN(dateDelete);
      xajax_fmfrmreportrevenue_deleteRevenue(dateDelete);  
    }
    
}

$('#fmfrmreportrevenue_fromdate').val(GetCurrentDateTime(0,1,false,0)) ;
$('#fmfrmreportrevenue_todate').val(GetCurrentDateTime(0,0,false,0)) ;
$('#fmfrmreportrevenue_dateDelete').val(GetCurrentDateTime(0,1,false,0)) ; 

changeWaiting(0);
fmfrmreportrevenue_createReport();
 </script>

<body>
<div class="divmain">
<table width="100%" id="fmfrmreportrevenue_tblinfo" class="tblInfo">
<tr>
<td valign="top" class="width25">
<div class="divLeft">  
<table class="info" id="fmfrmreportrevenue_tblcondition">
<tr >
<td  class="width100 clssearch" id="fmfrmreportrevenue_tdcondsearch">

<table class="width100">

 <tr>
<td colspan="2">
Xóa thông tin doanh thu đến trước ngày
</td>
</tr>
<tr style="boder-bottom: solid 1px black">
<td width="100">
<input type="text" value="" onblur="formatddmmyyyy(this)" style="width:75px" maxlength="10"  id="fmfrmreportrevenue_dateDelete"/>
<a href="javascript:fmfrmreportrevenue_cal3.popup();">
<img src="adagps.com/images/cal/cal2.png" id="fmfrmreportrevenue_imgCal3"  class="datepicker dpkstart" ></a>
</td>
<td>
<button id="fmfrmreportrevenue_btnDelete" onclick="fmfrmreportrevenue_deleteRevenue()" class="width100">Xóa dữ liệu doanh thu</button>
</td>
</tr>

<!--<tr><td>Phòng</td>
<td id='fmfrmreportrevenue_tdcbb'>
<select id="fmfrmreportrevenue_cbbRoom">
<option value="">--Tất cả--</option>
</select>  </td>
</tr> -->

 
<tr><td>Thời gian</td>
<td><input type="text" value="" onblur="formatddmmyyyy(this)" maxlength="10" class="datereport"  id="fmfrmreportrevenue_fromdate"/><a href="javascript:fmfrmreportrevenue_cal1.popup();">
<img src="adagps.com/images/cal/cal2.png" id="fmfrmreportrevenue_imgCal1" class="datepicker dpkstart" ></a>
-
<input type="text" class="datereport" onblur="formatddmmyyyy(this)" maxlength="10"  value=""  id="fmfrmreportrevenue_todate" /><a href="javascript:fmfrmreportrevenue_cal2.popup();">
<img src="adagps.com/images/cal/cal2.png" id="fmfrmreportrevenue_imgCal2"   class="datepicker dpkend" ></a>  </td></tr>
<tr><td rowspan="3">Loại báo cáo</td><td><input type="radio" checked="checked" name="fmfrmreportrevenue_reporttype" id="fmfrmreportrevenue_reporttype_1" value="1">
Thu nhập theo ngày</input> </td></tr>
<tr><td colspan="2"><input type="radio"  name="fmfrmreportrevenue_reporttype" id="fmfrmreportrevenue_reporttype_2" value="2">Thu nhập theo tuần</input></td></tr>
<tr><td colspan="2"><input type="radio"  name="fmfrmreportrevenue_reporttype" id="fmfrmreportrevenue_reporttype_3" value="3">Thu nhập theo tháng</input></td></tr> 
</table>
     <div class="divactionbuton">

        <button id="fmfrmreportrevenue_create" class="bntreport" onclick="fmfrmreportrevenue_createReport();" type="button"> Xem </button>
        </div>
</td>
</tr>
<tr>
<td>

<!--<button id="fmfrmreportrevenue_create" class="bntreport" onclick="fmfrmreportrevenue_createReport();" type="button"> Xem </button>-->
</td>
</tr>
</table>   
</div>
</td>
<td class="clsmiddle"></td>

<td width="80%" height="400" valign="top">
<div class="divGrid" id="fmfrmreportrevenue_divGrid">

</div></td>
<td class="clsend"></td>
</tr>
</table>
</div>

</body>

